#include "at32f415_board.h"
#include "at32f415_clock.h"

#include "dap_main.h"
#include "drv_usb2uart.h"
#include "drv_led.h"

int main(void)
{
    system_clock_config();
    delay_init();
    
    led_init();
    LED_PWR_ON();
    
    uartx_preinit();
    uartx2_preinit();
    chry_dap_init();
    
    while(1)
    {
        chry_dap_handle();
        chry_dap_usb2uart_handle(0);
        chry_dap_usb2uart_handle(1);
    }
}
